
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sj" tagdir="/WEB-INF/tags/spring-jquery-tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<link href="<c:url value='/css/cipe-ver2.css' />" rel="stylesheet"
	type="text/css" />
<link href="<c:url value='/css/dhtmlxcombo_paylineitem.css' />"
	rel="stylesheet" type="text/css" />


<script type="text/javascript">
	$(document).ready(function() {
		$('.dhx_combo_input').focus(function() {
			if ($(this).val() == "Select")
				$(this).val("");
		});
	});
	var z1 = dhtmlXComboFromSelect("donorId", 274);
	z1.enableFilteringMode(true);
	z1.DOMelem_input.style.backgroundColor = "white";
	z1.attachEvent("onChange", function() {
		if (z1.getComboText() == null || z1.getComboText() == "Select"
				|| z1.getComboText() == "") {
			z2.setComboValue("");
			z2.setComboText("Select");
			z2.clearAll();
			z2.addOption("", "Select", 274);
		} else {
			loadDataViaAjax("showDonorawardByDonor.do", {
				"id" : z1.getSelectedValue()
			}, parseDonorAwardJson);
		}
	});

	var z2 = dhtmlXComboFromSelect("donorAwardId", 274);
	z2.enableFilteringMode(true);
	z2.DOMelem_input.style.backgroundColor = "white";

	var z3 = dhtmlXComboFromSelect("donorAwardStatusId", 274);
	z3.enableFilteringMode(true);
	z3.DOMelem_input.style.backgroundColor = "white";

	var z4 = dhtmlXComboFromSelect("regionId", 274);
	z4.enableFilteringMode(true);
	z4.DOMelem_input.style.backgroundColor = "white";

	var z5 = dhtmlXComboFromSelect("programOfficerId", 274);
	z5.enableFilteringMode(true);
	z5.DOMelem_input.style.backgroundColor = "white";

	var z6 = dhtmlXComboFromSelect("projectStatusId", 274);
	z6.enableFilteringMode(true);
	z6.DOMelem_input.style.backgroundColor = "white";

	function parseDonorAwardJson(data) {
		z2.clearAll();
		if (data) {
			z2.setComboValue("");
			z2.setComboText("Select");
			for (p in data) {
				z2.addOption(data[p], p, 274);
			}
		}
	}
	function clearDiv() {
		Popup.hide('activeProjectQueryInput2');
		$('#activeProjectQueryInput2').html("");
	}
</script>


<div id="paymentRequest"
	style="border: solid black; background-color: #ffffff; padding-bottom: 10px; font-size: 100%; text-align: left;">
	<div class="form_head">
		<label style="font-size: 14px"><b><spring:message
					code="projectMechanicsReport.heading" /> </b> </label>
		<div class="floatR">
			<input type="image" src="<c:url value='/images/cross-button.jpg'/>"
				onClick="javascript:clearDiv()" />
		</div>

	</div>
	<form:form action="showProjectMechanicPdf.do"
		name="activeProjectQueryForm" id="activeProjectQueryForm"
		target="_blank" modelAttribute="cipeproject" method="post">
		<table cellpadding="0" cellspacing="4" border="0">
			<tr>
				<td class="label2" align="right">Donor :</td>
				<td class="input-field" colspan="2"><form:select path=""
						id="donorId" cssClass="input-full-width text_white" tabindex="1">
						<form:option value="" label="Select" />
						<form:options items="${donorList}" itemValue="id"
							itemLabel="donorName" />
					</form:select></td>
				<td width="300px"></td>
			</tr>
			<tr>
				<td class="label2" align="right">Donor Award :</td>
				<td class="input-field" colspan="2"><form:select
						id="donorAwardId" path="donoraward.id"
						cssClass="input-full-width text_white" tabindex="2">
						<form:option value="" label="Select" />
						<form:options items="${donorawardList}" itemValue="id"
							itemLabel="fullDonorawardNumber" />
					</form:select></td>
				<td width="300px"></td>
			</tr>
			<tr>
				<td class="label2" align="right">DonorAward Status :</td>
				<td class="input-field" colspan="2"><form:select
						path="donoraward.donorawardstatus.id" id="donorAwardStatusId"
						cssClass="input-full-width text_white" tabindex="1">
						<form:option value="" label="Select" />
						<form:options items="${donorawardstatusList}" itemValue="id"
							itemLabel="displayName" />
					</form:select></td>
				<td width="300px"></td>
			</tr>
			<tr>
				<td class="label2" align="right">Region :</td>
				<td class="input-field" colspan="2"><form:select
						path="region.id" id="regionId"
						cssClass="input-full-width text_white" tabindex="1">
						<form:option value="" label="Select" />
						<form:options items="${regionList}" itemValue="id"
							itemLabel="displayName" />
					</form:select></td>
				<td width="300px"></td>
			</tr>
			<tr>
				<td class="label2" align="right">Program Officer :</td>
				<td class="input-field" colspan="2"><form:select
						path="programOfficer.id" id="programOfficerId"
						cssClass="input-full-width text_white" tabindex="1">
						<form:option value="" label="Select" />
						<form:options items="${programOfficerList}" itemValue="id"
							itemLabel="fullName" />
					</form:select></td>
				<td width="300px"></td>
			</tr>
			<tr>
				<td class="label2" align="right">Project Status :</td>
				<td class="input-field" colspan="2"><form:select
						path="cipeprojectstatus.id" id="projectStatusId"
						cssClass="input-full-width text_white" tabindex="1">
						<form:option value="" label="Select" />
						<form:options items="${cipeprojectstatusList}" itemValue="id"
							itemLabel="displayName" />
					</form:select></td>
				<td width="300px"></td>
			</tr>
			<tr>
				<td class="label2" colspan="2" align="right">
					<div style="text-align: center; width: 300px">Check here to
						get portfolio of all projects with a status of 'Pending', 'Active'
						and 'Over' and leave 'Project Status' criteria blank.</div></td>
				<td><form:checkbox path="statusoverride" tabindex="8" /></td>
			</tr>

			<tr>
				<td colspan="4"><input style="margin-left: 300px"
					type="submit" id="previewButton" class="blue_btn"
					value=" Show Report" /></td>

			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>

			</tr>

		</table>
	</form:form>
</div>
<script type="text/javascript">
	function clearDiv() {
		Popup.hide('activeProjectQueryInput2');
		$('#activeProjectQueryInput2').html("");
	}
</script>

